//检测用户进入的页面是否登录过
export const isLogin = () => {
	const str = uni.getStorageSync('userinfo') || '';
	const userInfo = str.length ? JSON.parse(str) : {};
	const token = userInfo?.access_token;
	if (!token?.length) {
		uni.showToast({
			title: '当前用户未登录',
			icon: 'error'
		});
		setTimeout(() => {
			uni.reLaunch({
				url: '/pages/login/login'
			});
		}, 2000);
	}
}